<!--
 * @Author: Aaron
 * @Date: 2021-09-27 14:52:13
 * @LastEditors: yanMeng
 * @LastEditTime: 2022-09-22 10:01:34
 * @Description: file content
 * @FilePath: \ias_ui\src\views\coi\approve\components\detailPage.vue
 * @Company: 沃尔玛
-->
<template>
  <div>
    <headline :headline="'商品详情页'" />
    <div v-if="formRoute == 'examine' && goodsInfo.skuChannelInfos[0]" class="picList" v-html="createdDom(goodsInfo.skuChannelInfos[0].skuContentResources)" />
    <div v-else class="picList" v-html="createdDom(goodsInfo.skuContentResources)" />
    <el-form label-width="100px">
      <special :goods-info="goodsInfo" :is-disabled="true" />
      <el-form-item label="备注">
        <el-input v-model="goodsInfo.submitTrialRemark" type="textarea" rows="10" disabled />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import headline from './headline'
import special from '@/views/coi/making/special.vue'
import { createPicDom } from '@/views/coi/commonJs/createPicDom.js'

export default {
  components: {
    headline,
    special
  },
  props: {
    goodsInfo: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  data() {
    return {
      formRoute: ''
    }
  },
  created() {
    this.formRoute = this.$route.query.formRoute
  },
  methods: {
    createdDom(v) {
      return createPicDom(v, 'resourceUrl', true)
    }
  }
}
</script>

<style scoped lang="scss">
/deep/ img {
  width: 100%;
}
/deep/ .el-form-item__content {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.picList {
  padding: 0 10px;
}
</style>
